/**
 * Copyright(c) by JNet Smartware Group.
 * All rights reserved. Not distribution or redistribution without
 * any permission of JNet Smartware Group.
 * 
 * @author thuc
 * 2010/03/15
 */
package vn.smartware.co.java.net.commons;

import java.io.Serializable;

/**
 * PropertyInfo
 *  
 */
@SuppressWarnings({"rawtypes"})
public class PropertyInfo implements Serializable, Cloneable {
	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 1601048330090127303L;
	/**
	 * Property name
	 */
	private String propertyName;
	/**
	 * The property's class name
	 */
	private Class propertyType;
	/**
	 * Property kind 1: Simple property 2: List property 3: Map property 4:Info
	 * property
	 */
	private Byte propertyKind;
	/**
	 *  
	 */
	public PropertyInfo() {
		super();
	}

	/**
	 * 
	 * @param propertyName
	 * @param propertyType
	 * @param propertyKind
	 */
	public PropertyInfo(String propertyName, Class propertyType,
			Byte propertyKind) {
		super();
		this.propertyName = propertyName;
		this.propertyType = propertyType;
		this.propertyKind = propertyKind;
	}

	/**
	 * @return Returns the propertyKind.
	 */
	public Byte getPropertyKind() {
		return this.propertyKind;
	}
	/**
	 * @param propertyKind
	 *            The propertyKind to set.
	 */
	public void setPropertyKind(Byte propertyKind) {
		this.propertyKind = propertyKind;
	}
	/**
	 * @return Returns the propertyName.
	 */
	public String getPropertyName() {
		return this.propertyName;
	}
	/**
	 * @param propertyName
	 *            The propertyName to set.
	 */
	public void setPropertyName(String propertyName) {
		this.propertyName = propertyName;
	}
	/**
	 * @return Returns the propertyType.
	 */
	public Class getPropertyType() {
		return this.propertyType;
	}
	/**
	 * @param propertyType
	 *            The propertyType to set.
	 */
	public void setPropertyType(Class propertyType) {
		this.propertyType = propertyType;
	}

	/**
	 * 
	 * @return Object
	 */
	public Object clone() {
		PropertyInfo instance = new PropertyInfo();
		instance.setPropertyName(this.propertyName);
		instance.setPropertyType(this.propertyType);
		instance.setPropertyKind(this.propertyKind);
		return instance;
	}
}